package com.poly.system.pojo.dto;

import com.poly.common.core.validate.Add;
import com.poly.common.core.validate.Update;
import com.poly.common.core.web.domain.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 模板信息对象 sys_template
 *
 * @author Yang huijing
 * @date 2024-02-21
 */
@ApiModel(value = "SysTemplateDTO", description = "模板信息")
@Data
public class SysTemplateDTO extends BaseDTO {
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @ApiModelProperty("编号")
    private Long id;

    /**
     * 模板编码
     */
    @ApiModelProperty("模板编码")
    @NotBlank(message = "模板编码不能为空", groups = {Add.class, Update.class})
    @Size(message = "模板编码长度必须小于32个字符", max = 32, groups = {Add.class, Update.class})
    //@Pattern(message = "模板编码格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String code;

    /**
     * 模板名称
     */
    @ApiModelProperty("模板名称")
    @NotBlank(message = "模板名称不能为空", groups = {Add.class, Update.class})
    @Size(message = "模板名称长度必须小于255个字符", max = 255, groups = {Add.class, Update.class})
    //@Pattern(message = "模板名称格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String name;

    /**
     * 模板内容
     */
    @ApiModelProperty("模板内容")
    @NotBlank(message = "模板内容不能为空", groups = {Add.class, Update.class})
    @Size(message = "模板内容长度必须小于255个字符", max = 255, groups = {Add.class, Update.class})
    //@Pattern(message = "模板内容格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String content;

    /**
     * 模板类型
     */
    @ApiModelProperty("模板类型")
    @NotNull(message = "模板类型不能为空", groups = {Add.class, Update.class})
    private Integer type;

    /**
     * 级别
     */
    @ApiModelProperty("级别")
    @NotNull(message = "级别不能为空", groups = {Add.class, Update.class})
    private Integer level;

    /**
     * 状态
     */
    @ApiModelProperty("状态")
    @NotNull(message = "状态不能为空", groups = {Add.class, Update.class})
    private Integer status;

    /**
     * 备注
     */
    @Size(message = "备注长度必须小于500个字符", max = 500, groups = {Add.class, Update.class})
    private String remark;
}
